Currently, packet transmission between devices or between modules in a device exists widely in a communications system. Generally, before packets are sent, congestion management needs to be performed on the packets to be sent, so as to reduce a packet loss ratio in a packet transmission process. In a congestion management stage, if buffer queues are full or a quantity of packets waiting to enter the buffer queues exceeds a limit value, a congestion management mechanism may discard the packets waiting to enter the buffer queues; if the buffer queues are not full or the quantity of packets waiting to enter the buffer queues does not reach the limit value, the congestion management mechanism adds the packets into the buffer queues, where a packet in the congestion management stage is an unbuffered packet. In a packet buffering stage, multiple packets are allocated to different queues, and wait for sending scheduling in order of queue entering time. In a sending scheduling stage, a sending scheduling mechanism retrieves the packets from the queues and sends them to a receive end.
In an existing packet transmission process, before being transmitted, a packet needs to undergo three stages of processing: congestion management, packet buffering, and sending scheduling. In both the congestion management stage and the sending scheduling stage, a differential processing mechanism based on packet importance exists. For example, when buffer queues are full or a quantity of unbuffered packets exceeds a limit value, the congestion management mechanism may discard some unbuffered packets; the sending scheduling mechanism may preferentially select packets in a queue of greater importance for sending. Such a differential processing mechanism, however, does not exist in the packet buffering stage. In a queue, packets are buffered only in order of queue entering time. When the queues are full or the limit value is exceeded, packets that are not buffered in the congestion management stage cannot enter a queue. Although some unbuffered packets can be discarded in the congestion management stage, a quantity of packets discarded in the congestion management stage increases with an increase in the quantity of unbuffered packets, and it is still unavoidable for the congestion management mechanism to discard important unbuffered packets, which affects quality of service (Quality of Service, QoS for short) of an important service.